tools/update: fix use of dmidecode in context of nested hosts - #576
Merged
Conversation
olivierh-pro
force-pushed
the
ohu/00/new-attribute-nested-host
branch
from
June 8, 2026 14:35
094b59b to
962bb58
Compare
olivierh-pro
force-pushed
the
ohu/01/fix-dmidecode-system-uuid
branch
from
June 8, 2026 14:42
8cb76c6 to
f6eec8c
Compare
olivierh-pro
force-pushed
the
ohu/00/new-attribute-nested-host
branch
2 times, most recently
from
June 10, 2026 08:24
36ab45b to
9e361dc
Compare
olivierh-pro
force-pushed
the
ohu/01/fix-dmidecode-system-uuid
branch
from
June 10, 2026 08:50
f6eec8c to
cce5411
Compare
olivierh-pro
marked this pull request as ready for review
June 10, 2026 08:51
glehmann
approved these changes
Jun 10, 2026
rzr
reviewed
Jun 10, 2026
| dmi_key = "system-serial-number" if self.is_nested else "system-uuid" | ||
| system_uuid = self.ssh(f"dmidecode -s {dmi_key}").lower().strip() | ||
| if not system_uuid: | ||
| raise ValueError(f"The system uuid '{system_uuid}' incorrect.") |
Contributor
There was a problem hiding this comment.
Suggested change
| raise ValueError(f"The system uuid '{system_uuid}' incorrect.") | |
| raise ValueError(f"The system uuid '{system_uuid}' is incorrect.") |
rzr
reviewed
Jun 10, 2026
| """Get system uuid of current host. | ||
|
|
||
| Intended for driving current host from its "parent host" in a **nested context**. | ||
| In case host is nested, it uses `system-serial-number` instead of `system-uuid`. |
Contributor
There was a problem hiding this comment.
Suggested change
| In case host is nested, it uses `system-serial-number` instead of `system-uuid`. | |
| In case host is nested, it uses `system-serial-number` instead of `system-uuid`. | |
| (TODO: This workaround is tracked in XCPNG-2775 ) |
(ideally prefer an upstream bug id if any exists)
rzr
approved these changes
Jun 10, 2026
rzr
left a comment
Contributor
There was a problem hiding this comment.
Let me try to test it, before merge.
olivierh-pro
force-pushed
the
ohu/01/fix-dmidecode-system-uuid
branch
from
June 10, 2026 12:10
cce5411 to
4ca5916
Compare
rzr
approved these changes
Jun 10, 2026
rzr
left a comment
Contributor
There was a problem hiding this comment.
I tested, the snapshot is working and noticed that yum errors are ignored, I would raise an expection on failed ssh commands (it can be done in later PR), let's merge
Signed-off-by: Olivier Hoareau <olivier.hoareau@vates.tech>
Sometimes, the command dmidecode with the dmi key `system-uuid` works with unexpected results (bits are shifted). For nested hosts, we need to use dmi key `system-serial-number`. Take a look at #567 (comment) Signed-off-by: Olivier Hoareau <olivier.hoareau@vates.tech>
olivierh-pro
force-pushed
the
ohu/01/fix-dmidecode-system-uuid
branch
from
June 10, 2026 15:22
4ca5916 to
6baaf55
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an unexpected behaviour for command
dmidecode -s system-uuidin nested hosts (Some bits are shifted): See comment here.Reminder: "system uuid" is used to target a nested host in its hosting pool. This work follows up previous work in snapshot creation (#468).